using Acme.ELeMe.SDK.Request;
using Acme.ELeMe.SDK.Request.Order;
using Acme.ELeMe.SDK.Response;
using WebApiClientCore;
using WebApiClientCore.Attributes;

namespace Acme.ELeMe.SDK.Api;

[JsonNetReturn]
public interface IElmApi : IHttpApi
{
    #region 商户

    [HttpPost]
    ITask<BizResultWrapper<ShopGetRespData>> ShopGet([JsonContent] ShopGetDto shopGetDto);

    [HttpPost]
    ITask<BizResultWrapper<object>> ShopUpdate([JsonContent] ShopUpdateDto shopUpdateDto);
 
    [HttpPost]
    ITask<BizResultWrapper<string>> ShopAnnouncementSet([JsonContent] ShopAnnouncementSetDto shopAnnouncementSetDto);
    
    [HttpPost]
    ITask<BizResultWrapper<object>> ShopClose([JsonContent] ShopCloseDto shopCloseDto);
    
    [HttpPost]
    ITask<BizResultWrapper<object>> ShopOpen([JsonContent] ShopOpenDto shopOpenDto);

    #endregion

    #region 订单

    [HttpPost]
    ITask<BizResultWrapper<BillGetResult>> BillGet([JsonContent] BillGetDto input);

    [HttpPost]
    ITask<BizResultWrapper<BillOrderDetailGetResult>> BillOrderDetailGet([JsonContent] BillOrderDetailGetDto input);

    [HttpPost]
    ITask<BizResultWrapper<bool?>> OrderConfirm([JsonContent] OrderConfirmDto orderConfirmDto);
    
    /// <summary>
    /// 商家审核逆向单
    /// </summary>
    /// <param name="orderReverseProcessDto"></param>
    /// <returns></returns>
    [HttpPost]
    ITask<BizResultWrapper<bool?>> OrderReverseProcess([JsonContent] OrderReverseProcessDto orderReverseProcessDto);


    [HttpPost]
    ITask<BizResultWrapper<OrderGetRespData>> OrderGet([JsonContent] OrderGetDto orderConfirmDto);

    [HttpPost]
    ITask<BizResultWrapper<OrderListRespData>> OrderList([JsonContent] OrderListDto orderListDto);

    [HttpPost]
    ITask<BizResultWrapper<OrderReverseQueryResult>> OrderReverseQuery([JsonContent] OrderReverseQueryDto orderReverseQueryDto);

    /// <summary>
    /// 获取订单配送信息
    /// </summary>
    /// <param name="orderDeliveryGetDto"></param>
    /// <returns></returns>
    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<OrderDeliveryResult>> OrderDeliveryGet([JsonContent] OrderDeliveryGetDto orderDeliveryGetDto);
    /// <summary>
    /// 订单拣货完成
    /// </summary>
    /// <param name="orderPickCompleteDto"></param>
    /// <returns></returns>
    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<string> OrderPickComplete([JsonContent] OrderPickCompleteDto orderPickCompleteDto);

    /// <summary>
    /// 自配送接入骑手状态同步 https://open-retail.ele.me/#/apidoc/me.ele.retail:order.selfDeliveryStateSync-3?aopApiCategory=order_all&type=null
    /// </summary>
    /// <param name="req"></param>
    /// <returns></returns>
    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<bool?>> OrderSelfDeliveryStateSync([JsonContent] OrderStateSyncReqDto req);


    /// <summary>
    /// 订单送达 https://open-retail.ele.me/#/apidoc/me.ele.retail:order.complete-3?aopApiCategory=order_all&type=null
    /// </summary>
    /// <param name="req"></param>
    /// <returns></returns>
    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<bool?>> OrderComplete([JsonContent] OrderCompleteDto req);

    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<bool?>> OrderReverseApply([JsonContent] OrderReverseApplyDto orderReverseApplyDto);

    #endregion

    #region 商品
    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<SkuShopCategoryGetResult>> SkuShopCategoryGet([JsonContent] SkuShopCategoryGetDto skuShopCategoryGetDto);

    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<SkuShopCategoryCreateResult>> SkuShopCategoryCreate([JsonContent] SkuShopCategoryCreateDto skuShopCategoryCreateDto);

    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<object?>> SkuShopCategoryUpdate([JsonContent] SkuShopCategoryUpdateDto skuShopCategoryUpdateDto);

    [HttpPost]
    ITask<BizResultWrapper<object?>> SkuShopCategoryDelete([JsonContent] SkuShopCategoryDeleteDto skuShopCategoryDeleteDto);

    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<SkuCreateResult>> SkuCreate([JsonContent] SkuCreateDto skuCreateDto);

    [HttpPost]
    ITask<BizResultWrapper<SkuUpdateResult>> SkuUpdate([JsonContent] SkuUpdateDto skuUpdateDto);

    [HttpPost]
    ITask<BizResultWrapper<object?>> SkuShopCategoryMap([JsonContent] SkuShopCategoryMapDto skuShopCategoryMapDto);

    [HttpPost]
    ITask<BizResultWrapper<object?>> SkuShopCustomskuMap([JsonContent] SkuShopCustomskuMapDto skuShopCustomskuMapDto);

    [HttpPost]
    ITask<BizResultWrapper<object?>> SkuDelete([JsonContent] SkuDeleteDto skuDeleteDto);

    [HttpPost]
    ITask<BizResultWrapper<SkuListResult>> SkuList([JsonContent] SkuListDto skuListResult);

    [HttpPost]
    ITask<BizResultWrapper<object?>> SkuOnlineOne([JsonContent] SkuOnlineOneDto skuOnlineDto);

    [HttpPost]
    ITask<BizResultWrapper<object?>> SkuOfflineOne([JsonContent] SkuOfflineOneDto skuOffineDto);

    [HttpPost]
    //[LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<object?>> SkuPriceUpdateOne([JsonContent] SkuPriceUpdateOneDto skuPriceUpdateOneDto);

    [HttpPost]
    [LoggingFilter(Enable = true, LogRequest = true, LogResponse = true)]
    ITask<BizResultWrapper<object?>> SkuSpecUpdatePrice([JsonContent] SkuSpecUpdatePriceDto skuSpecUpdatePriceDto);

    [HttpPost]
    ITask<BizResultWrapper<object?>> SkuStockUpdateBatch([JsonContent] SkuStockUpdateBatchDto skuStockUpdateBatchDto);

    [HttpPost]
    ITask<BizResultWrapper<object?>> SkuSpecStockUpdate([JsonContent] SkuSpecStockUpdateDto skuSpecStockUpdateDto);
    #endregion

    #region 商品类目列表
    [HttpPost]
    ITask<BizResultWrapper<List<SkuCategoryListResult>>> SkuCategoryList([JsonContent] SkuCategoryListDto skuCategoryListDto);

    #endregion

    #region 公共
    [HttpPost]
    ITask<BizResultWrapper<PictureUploadResult>> PictureUpload([JsonContent] PictureUploadDto pictureUploadDto);
    #endregion
}